<template>
	<j-cell-group>
		<j-cell title="日期格式" :tips="GeneralLocation.DateFormat" :more="false"></j-cell>
		<j-cell title="日期分割符" :tips="GeneralLocation.DateSeparator" :more="false"></j-cell>
		<j-cell title="时间格式" :tips="GeneralLocation.TimeFormat" :more="false"></j-cell>
		<j-cell title="语言选择" :tips="GeneralLocation.Language" :more="false"></j-cell>
		<j-cell title="视频格式" :tips="GeneralLocation.VideoFormat" :more="false"></j-cell>
		<j-cell title="夏令时规则" :tips="GeneralLocation.DSTRule" :more="false"></j-cell>
		<j-cell-card title="夏令时开始时间" :show="false" :is-touch="false" border style="background: #f5f7fb">
			<j-cell title="年" :tips="GeneralLocation.DSTStart.Year" :more="false"></j-cell>
			<j-cell title="月" :tips="GeneralLocation.DSTStart.Month" :more="false"></j-cell>
			<j-cell title="日" :tips="GeneralLocation.DSTStart.Day" :more="false"></j-cell>
			<j-cell title="星期" :tips="GeneralLocation.DSTStart.Week" :more="false"></j-cell>
			<j-cell title="时" :tips="GeneralLocation.DSTStart.Hour" :more="false"></j-cell>
			<j-cell title="分" :tips="GeneralLocation.DSTStart.Minute" :more="false"></j-cell>
		</j-cell-card>
		<j-cell-card title="夏令时结束时间" :show="false" :is-touch="false" border style="background: #f5f7fb">
			<j-cell title="年" :tips="GeneralLocation.DSTEnd.Year" :more="false"></j-cell>
			<j-cell title="月" :tips="GeneralLocation.DSTEnd.Month" :more="false"></j-cell>
			<j-cell title="日" :tips="GeneralLocation.DSTEnd.Day" :more="false"></j-cell>
			<j-cell title="星期" :tips="GeneralLocation.DSTEnd.Week" :more="false"></j-cell>
			<j-cell title="时" :tips="GeneralLocation.DSTEnd.Hour" :more="false"></j-cell>
			<j-cell title="分" :tips="GeneralLocation.DSTEnd.Minute" :more="false"></j-cell>
		</j-cell-card>
		<j-cell title="工作日" :tips="GeneralLocation.WorkDay" :more="false"></j-cell>
	</j-cell-group>
</template>

<script>
export default {
    data() {
        return {
            token: '',
            GeneralLocation: {
                DateFormat: '',
                DateSeparator: '',
                TimeFormat: '',
                Language: '',
                VideoFormat: '',
                DSTRule: '',

                DSTStart: {
                    Year: '',
                    Month: '',
                    Day: '',
                    Week: '',
                    Hour: '',
                    Minute: ''
                },

                DSTEnd: {
                    Year: '',
                    Month: '',
                    Day: '',
                    Week: '',
                    Hour: '',
                    Minute: ''
                },

                WorkDay: ''
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
		this.token = options.token
		this.getconfig();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        getconfig() {
            uni.showLoading();
            let token = this.token;
            let data = {
                Name: 'General.Location'
            };
            getApp().globalData.api.getconfig(data, token, (result) => {
                uni.hideLoading({
                    success: (res) => {
                        console.log(result);
                        this.GeneralLocation = result['General.Location']
                    }
                });
            });
        }
    }
};
</script>
<style></style>
